package com.qjq.glasses_shopping.result;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum CodeEnum {

    SUCCESS(200,"ok"),
    //系统异常
    SYSTEM_ERROR(500,"系统错误"),
    //业务异常
    PARAMETER_ERROR(601,"参数异常"),
    //添加产品类型异常
    ADD_PRODUCT_TYPE_ERROR(602,"三级产品不能添加子类型，超出限制"),
    //删除产品类型异常
    DELETE_PRODUCT_TYPE_ERROR(603,"含有子类型，删除失败"),
    //上传文件失败异常
    UPLOAD_FILE_ERROR(604,"上传文件失败"),
    //注册验证码错误
    REGISTER_CODE_ERROR(605,"注册验证码错误"),
    //手机号已注册
    REGISTER_REPEAT_PHONE_ERROR(606,"手机号已注册"),
    //用户名已注册
    REGISTER_REPEAT_NAME_ERROR(607,"用户名已注册"),
    //登录用户名或密码错误
    LOGIN_NAME_PASSWORD_ERROR(608,"用户名或密码错误"),
    //登录验证码错误
    LOGIN_CODE_ERROR(609,"验证码错误"),
    //登录没有手机号
    LOGIN_NOPHONE_ERROR(610,"手机号不存在，请前往注册"),
    //用户状态异常
    LOGIN_NO_USER_ERROR(611,"用户状态异常"),
    //二维码错误
    QR_CODE_ERROR(612,"二维码错误"),
    //验证签名错误
    CHECK_SIGN_ERROR(613,"验证签名错误"),
    //订单状态异常
    ORDER_STATUS_ERROR(614,"订单状态异常"),
    //订单未支付
    ORDER_NOT_PAY(615,"订单未支付"),
    //秒杀商品库存不足
    NO_STOCK_ERROR(616,"秒杀商品库存不足"),
    //订单已过期
    ORDER_EXPIRED_ERROR(617,"订单已过期"),
    //token无效
    TOKEN_INVALID_ERROR(618,"token无效"),

    ;
    private final Integer code;
    private final String msg;

}
